﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GN.Pay.Client
{
    /// <summary>
    /// 由于支付产生的异常
    /// </summary>
    [Serializable]
    public class PayException : Exception
    {
        /// <summary>
        /// 实例化 PayException 新实例
        /// </summary>
        /// <param name="code">错误代码</param>
        /// <param name="message">错误消息</param>
        public PayException(int code, string message) 
            : base(message)
        {
            this.Code = code;
        }

        /// <summary>
        /// 获取错误代码
        /// </summary>
        public int Code { get; private set; }
    }
}
